<style lang="scss" scoped>
.emergency-rescue {
    .emergency-title {
        font-size: 20px;
        font-weight: 400;
    }

    .pageForm {
        padding: 0 30px;
    }

    .el-divider--horizontal {
        margin: 10px 0;
    }
}
</style>

<template>
  <div class="emergency-rescue">
    <el-row type="flex" justify="end" style="padding-right: 40px">
      <el-button type="primary" @click="saveData">保存</el-button>
    </el-row>
    <el-form label-width="200px" class="pageForm" :model="newExamine">
      <el-row class="form-row">
        <el-row>
          <el-col :span="24">
            <span class="emergency-title">时刻记录</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-col :span="6">
            <el-form-item label="到达手术室时间：">
              <el-date-picker
                v-model="newExamine.arriveOperatingRoom"
                format="yyyy-MM-dd HH:mm:ss"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
                placeholder=""
              />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="麻醉开始时间：">
              <el-date-picker
                v-model="newExamine.startAnesthesiaTime"
                format="yyyy-MM-dd HH:mm:ss"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
                placeholder=""
              />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="插管时间：">
              <el-date-picker
                v-model="newExamine.cannulaTime"
                format="yyyy-MM-dd HH:mm:ss"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
                placeholder=""
              />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="机械通气时间：">
              <el-date-picker
                v-model="newExamine.mechanicalventilationTime"
                format="yyyy-MM-dd HH:mm:ss"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
                placeholder=""
              />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="手术开始时间：">
              <el-date-picker
                v-model="newExamine.startOperationTime"
                format="yyyy-MM-dd HH:mm:ss"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
                placeholder=""
              />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="浓缩红细胞、血浆送达时间：">
              <el-date-picker
                v-model="newExamine.plasmaDeliveryTime"
                format="yyyy-MM-dd HH:mm:ss"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
                placeholder=""
              />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="手术结束时间：">
              <el-date-picker
                v-model="newExamine.endOperationTime"
                format="yyyy-MM-dd HH:mm:ss"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
                placeholder=""
              />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="麻醉结束时间：">
              <el-date-picker
                v-model="newExamine.endAnesthesiaTime"
                format="yyyy-MM-dd HH:mm:ss"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
                placeholder=""
              />
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-col :span="6">
              <el-form-item label="拔管时间：">
                <el-date-picker
                  v-model="newExamine.tubeDrawingTime"
                  format="yyyy-MM-dd HH:mm:ss"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  type="datetime"
                  placeholder=""
                />
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="离开手术室时间：" prop="reporttime">
                <el-date-picker
                  v-model="newExamine.leavlOperatingRoom"
                  format="yyyy-MM-dd HH:mm:ss"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  type="datetime"
                  placeholder=""
                />
              </el-form-item>
            </el-col>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <span class="emergency-title">ASA分级</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-form-item label="">
            <el-radio-group v-model="newExamine.asaRadio">
              <el-col :span="12">
                <el-radio :label="1">Ⅰ：体格健康，发育营养良好，各器官功能正常。围手术期死亡率0.06%-0.08% </el-radio>
              </el-col>
              <el-col :span="12">
                <el-radio :label="2">Ⅱ：除外科疾病外，有轻度并存病，功能代偿健全。围手术期死亡率0.27%-0.40% </el-radio>
              </el-col>
              <el-col :span="12">
                <el-radio :label="3">Ⅲ：并存病情严重，体力活动受限，但尚能应付日常活动。围手术期死亡率1.82%-4.30% </el-radio>
              </el-col>
              <el-col :span="12">
                <el-radio :label="4">Ⅳ：并存病严重，丧失日常活动能力，经常面临生命威胁。围手术期死亡率7.80%-23.0%</el-radio>
              </el-col>
              <el-col :span="12">
                <el-radio :label="5">Ⅴ：无论手术与否，生命难以维持24小时的濒死病人。围手术期死亡率9.40%-50.7% </el-radio>
              </el-col>
              <el-col :span="12">
                <el-radio :label="6">Ⅵ： 确证为脑死亡，其器官拟用于器官移植手术</el-radio>
              </el-col>
            </el-radio-group>
          </el-form-item>
        </el-row>
        <el-row>
          <el-col :span="24">
            <span class="emergency-title">麻醉方式</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-form-item label="">
            <el-radio-group v-model="newExamine.anesthetistStyle">
              <el-col :span="4">
                <el-radio label="吸入麻醉">吸入麻醉</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="静吸复合麻醉">静吸复合麻醉</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="联合腰麻">联合腰麻</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="单纯硬膜外麻醉">单纯硬膜外麻醉</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="局部浸润麻醉">局部浸润麻醉</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="神经阻滞">神经阻滞</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="全静脉麻醉">全静脉麻醉</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="基础麻醉">基础麻醉</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="蛛网膜下腔阻滞麻醉">蛛网膜下腔阻滞麻醉</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="表面麻醉">表面麻醉</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="区域麻醉">区域麻醉</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="臂丛麻醉">臂丛麻醉</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="其他">其他</el-radio>
              </el-col>
            </el-radio-group>
          </el-form-item>
        </el-row>
        <el-row>
          <el-col :span="24">
            <span class="emergency-title">术前禁食</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-form-item label="">
            <el-col :span="4">
              <el-radio-group v-model="newExamine.preoperativeFasting">
                <el-radio :label="1">是</el-radio>
                <el-radio :label="0">否</el-radio>
              </el-radio-group>
            </el-col>
            <el-col :span="6">
              <el-form-item label="术前用药：">
                <el-input v-model="newExamine.premedicate" size="mini" style="width: 200px;" />
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="术前诊断：">
                <el-input v-model="newExamine.preoperativeDiagnosis" size="mini" style="width: 200px;" />
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="拟施手术名称：">
                <el-input v-model="newExamine.correctOperation" size="mini" style="width: 200px;" />
              </el-form-item>
            </el-col>
          </el-form-item>

        </el-row>
        <el-row>
          <el-col :span="24">
            <span class="emergency-title">体位</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-form-item label="">
            <el-radio-group v-model="newExamine.postural">
              <el-col :span="4">
                <el-radio label="水平仰卧位">水平仰卧位</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="屈氏体位">屈氏体位</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="胆囊手术位">胆囊手术位</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="头低斜坡位">头低斜坡位</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="头高脚低位">头高脚低位</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="侧卧位">侧卧位</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="颈后仰卧位 (甲状腺体位)">颈后仰卧位 (甲状腺体位)</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="侧卧前倾位">侧卧前倾位</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="折刀位">折刀位</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="俯卧位">俯卧位</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="截石位">截石位</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="半坐位(半卧位)">半坐位(半卧位)</el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="其他">其他 </el-radio>
              </el-col>
              <el-col :span="4">
                <el-radio label="其他">其他</el-radio>
              </el-col>
            </el-radio-group>
          </el-form-item>
        </el-row>

        <el-row>
          <el-col :span="24">
            <span class="emergency-title">术中出量</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-col :span="4">
            <el-form-item label="出血量">
              <el-input v-model="newExamine.duringOperationBleeding" size="mini" style="width: 200px;">
                <template slot="append">
                  ml
                </template>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="尿量">
              <el-input v-model="newExamine.urineVolume" size="mini" style="width: 200px;">
                <template slot="append">
                  ml
                </template>
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <span class="emergency-title">术中入量</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-col :span="4">
            <el-form-item label="晶体液">
              <el-input v-model="newExamine.crystalloidSolution" size="mini" style="width: 200px;">
                <template slot="append">
                  ml
                </template>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="胶体液">
              <el-input v-model="newExamine.colloidalFluid" size="mini" style="width: 200px;">
                <template slot="append">
                  ml
                </template>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="RBC">
              <el-input v-model="newExamine.rbc" size="mini" style="width: 200px;">
                <template slot="append">
                  ml
                </template>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="冷沉淀">
              <el-input v-model="newExamine.cryoprecipitate" size="mini" style="width: 200px;">
                <template slot="append">
                  单位
                </template>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="血小板">
              <el-input v-model="newExamine.bloodPlatelet" size="mini" style="width: 200px;">
                <template slot="append">
                  单位
                </template>
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-col :span="4">
            <el-form-item label="术后诊断">
              <el-input v-model="newExamine.postoperativeDiagnosis" size="mini" style="width: 200px;" />
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="实施手术名称">
              <el-input v-model="newExamine.nameOfOperationPerformed" size="mini" style="width: 200px;" />
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="镇痛方式">
              <el-input v-model="newExamine.analgesia" size="mini" style="width: 200px;" />
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="术后镇痛">
              <el-input v-model="newExamine.postoperativeAnalgesia" size="mini" style="width: 200px;" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="心脏手术">
              <el-radio-group v-model="newExamine.cardiosurgery">
                <el-radio label="1">是</el-radio>
                <el-radio label="0">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="4">
            <el-form-item label="手术医生">
              <el-input v-model="newExamine.surgeon" size="mini" style="width: 200px;" />
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="麻醉医生">
              <el-input v-model="newExamine.anesthetist" size="mini" style="width: 200px;" />
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="器械护士">
              <el-input v-model="newExamine.instrumentNurse" size="mini" style="width: 200px;" />
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="巡回护士">
              <el-input v-model="newExamine.circulatingNurse" size="mini" style="width: 200px;" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col>
            <el-form-item label="手术记录">
              <el-input v-model="newExamine.operationNote" size="mini" style="width: 100%;" />
            </el-form-item>
          </el-col>
        </el-row>
        <!-- <el-col :span="24">
          <el-form-item label="数据填报员">
            <el-input v-model="dataFillers" size="mini" style="width: 200px;" />
          </el-form-item>
        </el-col> -->
      </el-row>
    </el-form>
  </div>
</template>

<script>
import { firstTouchPoints } from '@/api/green-channel/emergencyRescue'
import { saveEventWeb } from '@/api/green-channel/saveEvent'
export default {
  props: ['checkrowdata'],
  data() {
    return {
      event51001Info: null, // 51001
      event51002Info: null, // 51002
      event51200Info: null, // 51200
      event51201Info: null, // 51201
      event51202Info: null, // 51202
      event51203Info: null, // 51203
      event51204Info: null, // 51204
      event51205Info: null, // 51204
      event51206Info: null, // 51204
      event51207Info: null, // 51204
      event51208Info: null, // 51204
      event51213Info: null, // 51213
      event51214Info: null, // 51214
      event51215Info: null, // 51215
      event51216Info: null, // 51216
      event51217Info: null, // 51215
      event51218Info: null, // 51216
      event51219Info: null, // 51215
      event51220Info: null, // 51216
      event51400Info: null, // 51400
      event51401Info: null, // 51401
      event51402Info: null, // 51402
      event51403Info: null, // 51403
      event51404Info: null, // 51404
      event51405Info: null, // 51405
      event51406Info: null, // 51406
      event51407Info: null, // 51407
      event51408Info: null, // 51408
      event51409Info: null, // 51409
      event51600Info: null, // 51600
      userId: '',
      missionId: '',
      newExamine: {
        arriveOperatingRoom: '', // 到达手术室时间
        startAnesthesiaTime: '', // 麻醉开始时间
        cannulaTime: '', // 插管时间
        mechanicalventilationTime: '', // 机械通气时间
        startOperationTime: '', // 手术开始时间
        plasmaDeliveryTime: '', // 浓缩红细胞、血浆送达时间
        endOperationTime: '', // 手术结束时间
        endAnesthesiaTime: '', // 麻醉结束时间
        tubeDrawingTime: '', // 拔管时间
        leavlOperatingRoom: '', // 离开手术室时间
        asaRadio: 0, // ASA分级Radio
        anesthetistStyle: '', // 麻醉方式
        preoperativeFasting: '', // 术前禁食
        premedicate: '', // 术前用药
        preoperativeDiagnosis: '', // 术前诊断
        correctOperation: '', // 拟实手术名称
        postural: '', // 体位
        duringOperationBleeding: '', // 术中出血量
        urineVolume: '', // 尿量
        crystalloidSolution: '', // 晶体液
        colloidalFluid: '', // 胶体液
        rbc: '', // RBC
        cryoprecipitate: '', // 冷沉淀
        bloodPlatelet: '', // 血小板
        postoperativeDiagnosis: '', // 术后诊断
        nameOfOperationPerformed: '', // 实施手术名称
        analgesia: '', // 镇痛方式
        postoperativeAnalgesia: '', // 术后镇痛
        cardiosurgery: '', // 心脏手术
        surgeon: '', // 手术医生
        anesthetist: '', // 麻醉医生
        instrumentNurse: '', // 器械护士
        circulatingNurse: '', // 巡回护士
        operationNote: '' // 手术记录
      }
    }
  },
  mounted() {
    this.init()
  },
  methods: {
    init() {
      this.event51001Info = {}
      this.event51002Info = {}
      this.event51200Info = {}
      this.event51201Info = {}
      this.event51202Info = {}
      this.event51203Info = {}
      this.event51204Info = {}
      this.event51205Info = {}
      this.event51206Info = {}
      this.event51207Info = {}
      this.event51208Info = {}
      this.event51209Info = {}
      this.event51210Info = {}
      this.event51211Info = {}
      this.event51212Info = {}
      this.event51213Info = {}
      this.event51214Info = {}
      this.event51215Info = {}
      this.event51216Info = {}
      this.event51217Info = {}
      this.event51218Info = {}
      this.event51219Info = {}
      this.event51220Info = {}
      this.event51400Info = {}
      this.event51401Info = {}
      this.event51402Info = {}
      this.event51403Info = {}
      this.event51404Info = {}
      this.event51405Info = {}
      this.event51406Info = {}
      this.event51407Info = {}
      this.event51408Info = {}
      this.event51409Info = {}
      this.event51600Info = {}
      this.userId = this.$store.getters.userId
      this.missionId = this.checkrowdata.dispatchId
      firstTouchPoints({
        apiToken: this.$store.getters.apiToken,
        dispatchId: this.checkrowdata.dispatchId
      }).then(res => {
        if (res.code == 0) {
          if (res.data && res.data.length > 0) {
            res.data.forEach(el => {
              if (el.event_id == '51001') {
                this.event51001Info = el
                this.newExamine.preoperativeFasting = el.state
              }
              if (el.event_id == '51002') {
                this.event51002Info = el
                this.newExamine.cardiosurgery = el.state
              }
              if (el.event_id == '51200') {
                this.event51200Info = el
                this.newExamine.anesthetistStyle = el.detail
              }
              if (el.event_id == '51201') {
                this.event51201Info = el
                this.newExamine.premedicate = el.detail
              }
              if (el.event_id == '51202') {
                this.event51202Info = el
                this.newExamine.preoperativeDiagnosis = el.detail
              }
              if (el.event_id == '51203') {
                this.event51203Info = el
                this.newExamine.correctOperation = el.detail
              }
              if (el.event_id == '51204') {
                this.event51204Info = el
                this.newExamine.postoperativeDiagnosis = el.detail
              }
              if (el.event_id == '51205') {
                this.event51205Info = el
                this.newExamine.nameOfOperationPerformed = el.detail
              }
              if (el.event_id == '51206') {
                this.event51206Info = el
                this.newExamine.analgesia = el.detail
              }
              if (el.event_id == '51207') {
                this.event51207Info = el
                this.newExamine.postoperativeAnalgesia = el.detail
              }
              if (el.event_id == '51208') {
                this.event51208Info = el
                this.newExamine.surgeon = el.detail
              }
              if (el.event_id == '51209') {
                this.event51209Info = el
                this.newExamine.anesthetist = el.detail
              }
              if (el.event_id == '51210') {
                this.event51210Info = el
                this.newExamine.instrumentNurse = el.detail
              }
              if (el.event_id == '51211') {
                this.event51211Info = el
                this.newExamine.circulatingNurse = el.detail
              }
              if (el.event_id == '51212') {
                this.event51212Info = el
                this.newExamine.operationNote = el.detail
              }
              if (el.event_id == '51213') {
                this.event51213Info = el
                this.newExamine.postural = el.detail
              }
              if (el.event_id == '51214') {
                this.event51214Info = el
                this.newExamine.duringOperationBleeding = el.detail
              }
              if (el.event_id == '51215') {
                this.event51215Info = el
                this.newExamine.urineVolume = el.detail
              }
              if (el.event_id == '51216') {
                this.event51216Info = el
                this.newExamine.crystalloidSolution = el.detail
              }
              if (el.event_id == '51217') {
                this.event51217Info = el
                this.newExamine.colloidalFluid = el.detail
              }
              if (el.event_id == '51218') {
                this.event51218Info = el
                this.newExamine.rbc = el.detail
              }
              if (el.event_id == '51219') {
                this.event51219Info = el
                this.newExamine.cryoprecipitate = el.detail
              }
              if (el.event_id == '51220') {
                this.event51220Info = el
                this.newExamine.bloodPlatelet = el.detail
              }
              if (el.event_id == '51400') {
                this.event51400Info = el
                this.newExamine.arriveOperatingRoom = el.hit_time
              }
              if (el.event_id == '51401') {
                this.event51401Info = el
                this.newExamine.startAnesthesiaTime = el.hit_time
              }
              if (el.event_id == '51402') {
                this.event51402Info = el
                this.newExamine.cannulaTime = el.hit_time
              }
              if (el.event_id == '51403') {
                this.event51403Info = el
                this.newExamine.mechanicalventilationTime = el.hit_time
              }
              if (el.event_id == '51404') {
                this.event51404Info = el
                this.newExamine.startOperationTime = el.hit_time
              }
              if (el.event_id == '51405') {
                this.event51405Info = el
                this.newExamine.plasmaDeliveryTime = el.hit_time
              }
              if (el.event_id == '51406') {
                this.event51406Info = el
                this.newExamine.endOperationTime = el.hit_time
              }
              if (el.event_id == '51407') {
                this.event51407Info = el
                this.newExamine.endAnesthesiaTime = el.hit_time
              }
              if (el.event_id == '51408') {
                this.event51408Info = el
                this.newExamine.tubeDrawingTime = el.hit_time
              }
              if (el.event_id == '51409') {
                this.event51409Info = el
                this.newExamine.leavlOperatingRoom = el.hit_time
              }
              if (el.event_id == '51600') {
                this.event51600Info = el
                this.newExamine.asaRadio = el.state
              }
            })
          }
        }
      })
    },

    async saveData() {
      const rescueData = [{
        detail: '',
        event_id: 51001,
        hit_time: '',
        id: this.event51001Info.id,
        missionId: this.missionId,
        property1: null,
        property2: '',
        property3: null,
        mission: '',
        source: this.event51001Info.source,
        state: this.newExamine.preoperativeFasting,
        target: null,
        type: this.event51001Info.type,
        userId: this.userId
      }, {
        detail: '',
        event_id: 51002,
        hit_time: '',
        id: this.event51002Info.id,
        missionId: this.missionId,
        property1: null,
        property2: '',
        property3: null,
        source: this.event51002Info.source,
        state: this.newExamine.cardiosurgery,
        target: null,
        type: this.event51002Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.anesthetistStyle,
        event_id: 51200,
        hit_time: '',
        id: this.event51200Info.id,
        missionId: this.missionId,
        property1: null,
        property2: this.ventilatorPneumonia,
        property3: null,
        source: this.event51200Info.source,
        state: this.event51200Info.state,
        target: null,
        type: this.event51200Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.premedicate,
        event_id: 51201,
        hit_time: '',
        id: this.event51201Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51201Info.source,
        state: this.event51201Info.state,
        target: null,
        type: this.event51201Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.preoperativeDiagnosis,
        event_id: 51202,
        hit_time: '',
        id: this.event51202Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51202Info.source,
        state: this.event51202Info.state,
        target: null,
        type: this.event51202Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.correctOperation,
        event_id: 51203,
        hit_time: '',
        id: this.event51203Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51203Info.source,
        state: this.event51203Info.state,
        target: null,
        type: this.event51203Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.postoperativeDiagnosis,
        event_id: 51204,
        hit_time: '',
        id: this.event51204Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51204Info.source,
        state: this.event51204Info.state,
        target: null,
        type: this.event51204Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.nameOfOperationPerformed,
        event_id: 51205,
        hit_time: '',
        id: this.event51205Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51205Info.source,
        state: this.event51205Info.state,
        target: null,
        type: this.event51205Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.analgesia,
        event_id: 51206,
        hit_time: '',
        id: this.event51206Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51206Info.source,
        state: this.event51206Info.state,
        target: null,
        type: this.event51206Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.postoperativeAnalgesia,
        event_id: 51207,
        hit_time: '',
        id: this.event51207Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51207Info.source,
        state: this.event51207Info.state,
        target: null,
        type: this.event51207Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.surgeon,
        event_id: 51208,
        hit_time: '',
        id: this.event51208Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51208Info.source,
        state: this.event51208Info.state,
        target: null,
        type: this.event51208Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.anesthetist,
        event_id: 51209,
        hit_time: '',
        id: this.event51209Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51209Info.source,
        state: this.event51209Info.state,
        target: null,
        type: this.event51209Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.instrumentNurse,
        event_id: 51210,
        hit_time: '',
        id: this.event51210Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51210Info.source,
        state: this.event51210Info.state,
        target: null,
        type: this.event51210Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.circulatingNurse,
        event_id: 51211,
        hit_time: '',
        id: this.event51211Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51211Info.source,
        state: this.event51211Info.state,
        target: null,
        type: this.event51211Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.operationNote,
        event_id: 51212,
        hit_time: '',
        id: this.event51212Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51212Info.source,
        state: this.event51212Info.state,
        target: null,
        type: this.event51212Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.postural,
        event_id: 51213,
        hit_time: '',
        id: this.event51213Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51213Info.source,
        state: this.event51213Info.state,
        target: null,
        type: this.event51213Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.duringOperationBleeding,
        event_id: 51214,
        hit_time: '',
        id: this.event51214Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51214Info.source,
        state: this.event51214Info.state,
        target: null,
        type: this.event51214Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.urineVolume,
        event_id: 51215,
        hit_time: '',
        id: this.event51215Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51215Info.source,
        state: this.event51215Info.state,
        target: null,
        type: this.event51215Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.crystalloidSolution,
        event_id: 51216,
        hit_time: '',
        id: this.event51216Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51216Info.source,
        state: this.event51216Info.state,
        target: null,
        type: this.event51216Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.colloidalFluid,
        event_id: 51217,
        hit_time: '',
        id: this.event51217Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51217Info.source,
        state: this.event51217Info.state,
        target: null,
        type: this.event51217Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.rbc,
        event_id: 51218,
        hit_time: '',
        id: this.event51218Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51218Info.source,
        state: this.event51218Info.state,
        target: null,
        type: this.event51218Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.cryoprecipitate,
        event_id: 51219,
        hit_time: '',
        id: this.event51219Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51219Info.source,
        state: this.event51219Info.state,
        target: null,
        type: this.event51219Info.type,
        user: this.userId
      }, {
        detail: this.newExamine.bloodPlatelet,
        event_id: 51220,
        hit_time: '',
        id: this.event51220Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51220Info.source,
        state: this.event51220Info.state,
        target: null,
        type: this.event51220Info.type,
        user: this.userId
      }, {
        detail: '',
        event_id: 51400,
        hit_time: this.newExamine.arriveOperatingRoom,
        id: this.event51400Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51400Info.source,
        state: this.event51400Info.state,
        target: null,
        type: this.event51400Info.type,
        user: this.userId
      }, {
        detail: '',
        event_id: 51401,
        hit_time: this.newExamine.startAnesthesiaTime,
        id: this.event51401Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51401Info.source,
        state: this.event51401Info.state,
        target: null,
        type: this.event51401Info.type,
        user: this.userId
      }, {
        detail: '',
        event_id: 51402,
        hit_time: this.newExamine.cannulaTime,
        id: this.event51402Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51402Info.source,
        state: this.event51402Info.state,
        target: null,
        type: this.event51402Info.type,
        user: this.userId
      }, {
        detail: '',
        event_id: 51403,
        hit_time: this.newExamine.mechanicalventilationTime,
        id: this.event51403Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51403Info.source,
        state: this.event51403Info.state,
        target: null,
        type: this.event51403Info.type,
        user: this.userId
      }, {
        detail: '',
        event_id: 51404,
        hit_time: this.newExamine.startOperationTime,
        id: this.event51404Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51404Info.source,
        state: this.event51404Info.state,
        target: null,
        type: this.event51404Info.type,
        user: this.userId
      }, {
        detail: '',
        event_id: 51405,
        hit_time: this.newExamine.plasmaDeliveryTime,
        id: this.event51405Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51405Info.source,
        state: this.event51405Info.state,
        target: null,
        type: this.event51405Info.type,
        user: this.userId
      }, {
        detail: '',
        event_id: 51406,
        hit_time: this.newExamine.endOperationTime,
        id: this.event51406Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51406Info.source,
        state: this.event51406Info.state,
        target: null,
        type: this.event51406Info.type,
        user: this.userId
      }, {
        detail: '',
        event_id: 51407,
        hit_time: this.newExamine.endAnesthesiaTime,
        id: this.event51407Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51407Info.source,
        state: this.event51407Info.state,
        target: null,
        type: this.event51407Info.type,
        user: this.userId
      }, {
        detail: '',
        event_id: 51408,
        hit_time: this.newExamine.tubeDrawingTime,
        id: this.event51408Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51408Info.source,
        state: this.event51408Info.state,
        target: null,
        type: this.event51408Info.type,
        user: this.userId
      }, {
        detail: '',
        event_id: 51409,
        hit_time: this.newExamine.leavlOperatingRoom,
        id: this.event51409Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51409Info.source,
        state: this.event51409Info.state,
        target: null,
        type: this.event51409Info.type,
        user: this.userId
      }, {
        detail: '',
        event_id: 51600,
        hit_time: this.newExamine.leavlOperatingRoom,
        id: this.event51600Info.id,
        missionId: this.missionId,
        property1: null,
        property2: null,
        property3: null,
        source: this.event51600Info.source,
        state: this.event51600Info.state,
        target: null,
        type: this.event51600Info.type,
        user: this.userId
      }]
      await this.awaitchange(rescueData)
      this.$message({
        type: 'success',
        message: '保存成功'
      })
      this.init()
    },
    async awaitchange(data) {
      for (let i = 0; i < data.length; i++) {
        data[i].apiToken = this.$store.getters.apiToken
        await saveEventWeb(data[i]).then(async res => {
          // if (res.code == 0) {
          //   await console.log(1)
          // }
        })
      }
    }
  }
}
</script>
